package game.ability;

import game.entity.AbsSprite;
import game.shared.Constants;

public class MovingLeft extends AbsMoving {

	@Override
	public void run(AbsSprite sprite) {
		if(sprite.haveState(Constants.SPRITE_RUN_LEFT))
		{
			Constants.xx = slower;
			sprite.setPosition(sprite.getX() - speed*slower, sprite.getY());
			if(sprite.getCurrentState() != Constants.SPRITE_RUN_LEFT)
				sprite.setState(Constants.SPRITE_RUN_LEFT);
		}
	}
	
	public MovingLeft(float speed)
	{
		super(speed);
	}

}
